(1) Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for reducing contouring and coding distortion in a digital image signal.
(2) Description of the Related Art
Since a quantization error occurs in the processing using a digital signal, there are cases where distortion occurs in an output signal even when the input signal varies smoothly. The distortion is viewed as contouring on an image, and degrades the image quality. In particular, when gradation conversion processing that performs contrast enhancement on an image is performed, there are cases where image quality degradation due to the quantization error becomes a serious problem.
Furthermore, an image which is compressed using the Moving Picture Expert Group (MPEG) standard is obtained by quantizing a Discrete Cosine Transform (DCT) coefficient that is obtained by calculating a luminance signal of the image on a block basis. Thus, when the DCT coefficient is roughly quantized, there are cases where subjective picture quality is degraded due to the occurrence of block distortion.
For reducing the contouring or block distortion in the aforementioned image, a technique for adding a random number signal to the image is known. The adding of random numbers provides the following three advantages.
First, it becomes difficult to perceive a quantization error due to a masking effect produced by adding random numbers (for example, Japanese Unexamined Patent Application Publication No. 2004-336478).
Second, it is possible to represent a half-tone image by controlling an expected value of random numbers to be added.
For example, when adding either 1 or 0 to a pixel with a luminance of 50 with a 50/50 probability, the resulting value is statistically equivalent to a half-tone value with a luminance of 50.5 that is obtained by calculating the space average and temporal average. Japanese Unexamined Patent Application Publication No. 10-191332 discloses a technique of statistically representing gradation with fractional precision by controlling the probability distribution of created random numbers, even when a luminance difference between blocks where the detected distortion occurs is 1.
Third, when a difference between quantization steps for gradation in a display apparatus is not constant and there are level difference variations between the steps, it is possible to reduce the level difference and make the difference constant in each quantization step by adding a random number equal to or larger than one bit (a multi-bit random number) (for example, Japanese Unexamined Patent Application Publication No. 6-203148). With this, it is possible to reduce the contouring which is obvious when a difference in the quantization steps for gradation in a display apparatus is not constant.